#include"string.h"
void test01() {
	wz::string s;
	cout << s.c_str() << endl;
	wz::string s1("hello world");
	cout << s1.c_str() << endl;
	cout << s1.size() << endl;
	cout << s1[1] << s1[0]<<endl;
	s1[0] = 'w';
	cout << s1.c_str() << endl;
	for (size_t i = 0; i < s1.size(); i++)
	{
		cout << s1[i] << ' ';
	}
	cout << endl;
}
void test02() {
	wz::string s1("hello world");
	wz::iterator it1 = s1.begin();
	while (it1 != s1.end()) {
		(*it1)--;
		it1++;
	}
	cout << s1.c_str() << endl;
	for (auto ch : s1) {
		ch++;
		cout << ch << endl;
	}
	cout << s1.c_str() << endl;
	for (auto& ch : s1) {
		ch++;
	}
	cout << s1.c_str() << endl;
}
void test03() {
	wz::string s1("hello world");
	s1.insert(0, "xx");
	cout << s1.c_str() << endl;
	wz::string s2("hello world");
	cout << s2.c_str() << endl;
	s2.erase(6, 2);
	s2.erase(3);
	cout << s2.c_str() << endl;
}
void test04() {
	wz::string s1("hello world");
	
	cout << s1.find('e') << endl;
	cout << s1.find('e',2) << endl;
	
	cout << s1.find("wor") << endl;
	cout << s1.find("wor",5) << endl;
	
}
void test05() {
	wz::string s1;
	s1.push_back('c');
	cout << s1.c_str() << endl;
}
int main() {
	//test01();
	//test02();
	//test03();
	//test04();
	test05();
	return 0;
}